using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerDataProxy : PureMVC.Patterns.Proxy
{
    public new const string NAME = "PlayerDataProxy";
    public PlayerDataModel playerDataModel;
    public PlayerDataProxy(string proxyName) : base(proxyName)
    {
        Debug.Log("PlayerDataProxy");
        playerDataModel = new PlayerDataModel();
        playerDataModel.Gold = 9999999;
    }
    public float RefreshGold(float _gold)
    {
        playerDataModel.Gold += _gold;
        if (playerDataModel.Gold<=0)
        {
            playerDataModel.Gold = 0;
        }
        if (playerDataModel.Gold >= 9999999)
        {
            playerDataModel.Gold = 9999999;
        }
        return playerDataModel.Gold;
    }
}
